- /* siosior.cpp by K.Tsuru */
- // function ID = 409 BRADIX
- /***************************************
- SInteger class
- It provides the bit "or" operation m|n.
- ****************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
- SInteger operator|(const SInteger& m, const SInteger& n){
- if(m.Sign(409) == 0) return n;
- if(n.Sign(409) == 0) return m;
-
- const fType* mv;
- const fType* nv;
- uint t, h;
- mv = m.ReadFigures();
- nv = n.ReadFigures();
- h = max(m.Head(), n.Head()); // aHead --> Head() since ver 2.191
- t = min(m.Tail(), n.Tail());
-
- SInteger result;
- result.valloc(h+1u, -1);
- result.figure.clear(0, t);
- result.figure.clear(h+1u);
- fType* rv = result.figure.Elements();
-
- for(register uint i = t; i<= h; i++){
- rv[i] = mv[i] | nv[i];
- }
- result.aTail = t;
- result.aHead = h;
- result.SetSign(1); //It always attaches the positive sign.
- return result;
- }
siosior.cpp : last modifiled at 2017/03/13 14:32:00(908 bytes)
created at 2016/04/25 14:53:17
The creation time of this html file is 2017/10/25 11:09:45 (Wed Oct 25 11:09:45 2017).